/***************************************************************************
 *            memory
 *
 *  Thu Sep 24 18:53:18 2009
 *  Copyright  2009  nreimens
 *  <nreimens@aeolus.eece.labs>
 ****************************************************************************/

#ifndef MEMORY_MOD_H
#define MEMORY_MOD_H

#include "glob.h"
#include "dList.h"
#include "freeMem.h"
#include "schedualer.h"
#include "operations.h"
#include "do_instruct.h"

int init_mem(MEMMOD** mm, char *brainpath);
void clean_mem(MEMMOD **mm);
int init_pcb(PCB **pcb, int nProgs);
int mem_store(MEMMOD* mm, size_t memLocation, char value[4], int pid);
int mem_read(MEMMOD* mm, size_t memLocation, char* box, int pid);
int load_brain(MEMMOD* mm, char* brainpath, FILE **fpbrainfile, size_t memLocation, int pid);
void flush_mem(void);
void dump_mem(MEMMOD* mm);
int FindNewSize(char* strFile);

#endif
